package com.xcc.httpUtils.builder;

/**
 * Created by Carman on 2017/7/9.
 */

public class GetDownFileBuilder extends GetBuilder {

    private final String DOWN_FILE_HEADER = "RANGE";

    public GetDownFileBuilder(String url) {
        super(url);
    }

    /**
     * 设置下载文件的位置.用于断点续传.
     * @param position
     * @return
     */
    public GetDownFileBuilder setDownFilePosition(long position){
        addHeader(DOWN_FILE_HEADER, "bytes=" + position + "-");
        return this;
    }
}
